home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-13 / amac44c.zip / RFR008.QM < prev    next >
Text File  |  1992-06-22  |  25KB  |  666 lines

  1. *                               rfr008.qm
  2. *                        Macro to Swap Characters
  3. *                        Written By Tom Hogshead
  4. *                       [ See RFRMxx.QM For Use ]
  5. *                                 6/15/92
  6. *  Key     Subfile             Description                          Bytes
  7. * =====  ==========  ============================================   =====
  8. *  @f8             - Swap Character at Cursor with Character Beneath (18) |new
  9. *
  10. *                    Swap First Character on Line With Last
  11. *  @f6             -    Does NOT Maintain Blocks                      17  |new
  12. *  @f7             -    Maintains Blocks                              36  |new
  13. *
  14. *  @f1             - Swap Character at Cursor with PREV Character     12  |new
  15. *
  16. *  @1              - Swap Character at Cursor with NEXT Character     14  |chg
  17. *  @f2             -    Alternate version of @1 by John Goodman       14
  18. *  @7              -    Alternate version of @1 by G. de Bruin        12
  19. *  @f3             -    Slow version of @1 by Mike Konieczny          12
  20. *  @2              - Swap Two Characters LEFT of Cursor               16
  21. *  @f4             -    Alternate version of @2 by John Goodman       16
  22. *  @3              - Swap Current Cursor Line with Line BELOW         12
  23. *  @9              -    Alternate version of @3, Use this instead      8
  24. *  @4              - Swap Current Cursor Line with Line ABOVE         14
  25. *  @0              -    Alternate version of @4, Use this instead      8
  26. *  @5              - Swap Word at Cursor with Word RIGHT of Cursor    20
  27. *  @f5             -    Alternate version of @5                       18
  28. *  @6              - Swap Word at Cursor with Word LEFT of Cursor     21
  29. *  @8              - Duplicate Remainder of Previous Line             14
  30. *                                            John Goodman, Author
  31. *
  32. *         {e:\up\RFRM*}--Return To RFRMxx.QM
  33. *
  34. *  (Timing) of Macros @1, @7 and @b
  35. *
  36. *-- eoi
  37.  
  38. * 
  39. * -----------------------------------------------------------
  40. * @(1) Swap Character at Cursor Position with Next Character
  41. *      John Goodman, Author
  42. * -----------------------------------------------------------
  43. * This macro will swap the character at the current cursor position
  44. * with the character to the right of the current character.  The cursor
  45. * will be placed to the right of the two swapped characters at the end
  46. * of the macro.  This macro is useful for correcting transposition
  47. * errors in existing text.  It maintains marked blocks and is
  48. * irrespective of all Toggle states.  Timing results comparing @1, @7
  49. * and @b are shown below in Timing.
  50.  
  51. *1325467  test
  52.  
  53. @1  macrobegin
  54.     dupline
  55.     cursorright
  56.     delch
  57.     shiftright
  58.     getprev
  59.     shiftleft
  60.     cursorup
  61.     delline
  62.     cursorleft
  63.     cursorleft
  64. *
  65. * 16 bytes Wed  08-07-1991  18:58:30 (JG @1, v 1)
  66. * 15 bytes Thu  08-08-1991  19:21:58 (JG @1, v 2 based on TH's @3/jg-0807b.qm)
  67. * 14 bytes Wed  06-03-1992  16:22:00 (TH @1)
  68.  
  69. * 
  70. * -------------------------------------------------------
  71. * @(2) Swap the Two Characters to the Left of the Cursor
  72. *      Tom Hogshead and John Goodman, Authors
  73. * -------------------------------------------------------
  74. * Another macro that swaps the two characters to the left of the
  75. * cursor (which may be more useful if you've *just typed* a
  76. * transposition error)...
  77.  
  78. * This macro will swap the two characters to the left of the
  79. * cursor.  This macro is useful for correcting a transposition
  80. * error that has just been typed.
  81.  
  82. *1325467  test
  83.  
  84. @2      MacroBegin
  85.         DupLine         * Duplicate the current line
  86.         CursorLeft      * Move left one space
  87.         DelCh           * Delete the cursor character
  88.         CursorLeft      * Move to left most character to swap
  89.         SplitLine       * Split at cursor position
  90.         DelLine         * Delete dup'd line
  91.         CursorUp        * Move back to original line
  92.         DelCh           * Delete left most character to swap
  93.         CursorRight     * Move to starting cursor position
  94.         DelToEol        * Delete everything from starting pos right
  95.         JoinLine        * Join remainder of dup'd line
  96.         CursorRight     * Position cursor on first char after swapped chars
  97. *
  98. * 17 bytes Wed  08-07-1991  21:14:06 (JG/TH @2)
  99. * 16 bytes Thu  08-08-1991  22:27:55 (TH @4, in jg-0808b.qm/rfr008.qm)
  100.  
  101. * 
  102. * ----------------------------------------------
  103. * @(3) Swap Current Cursor Line with Line Below
  104. * ----------------------------------------------
  105. * This macro swaps the current cursor line with the line below.  The
  106. * same thing could be accomplished using markline/moveblock but this
  107. * macro is written to maintain any marked block (excluding any marked
  108. * swapping lines) during execution and is irrespective of all Toggle
  109. * states.  The cursor is positioned at the beginning of the swapped
  110. * line after macro execution.  Line length is limited to 256 characters
  111. * using joinline.
  112.  
  113. * With the cursor on line_1:
  114. *            >  line_1
  115. *                       line_2
  116. * becomes
  117. * >                     line_2
  118. *               line_1
  119.  
  120. @3      MacroBegin
  121.         EndLine
  122.         JoinLine
  123.         DupLine
  124.         DelToEol
  125.         CursorUp
  126.         SplitLine
  127.         DelLine
  128.         BegLine
  129. *
  130. * 12 bytes Tue  08-13-1991  12:15:13 (TH @3)
  131.  
  132. * 
  133. * ----------------------------------------------
  134. * @(4) Swap Current Cursor Line with Line Above
  135. * ----------------------------------------------
  136. * This macro swaps the current cursor line with the line above.  The
  137. * same thing could be accomplished using markline/moveblock but this
  138. * macro is written to maintain any marked block (excluding any marked
  139. * swapping lines) during execution and is irrespective of all Toggle
  140. * states.  The cursor is positioned at the beginning of the swapped
  141. * line after macro execution.  Line length is limited to 256 characters
  142. * using joinline.
  143.  
  144. * With the cursor on line_1:
  145. *               line_0
  146. *            >          line_1
  147. * becomes
  148. *                       line_1
  149. * >             line_0
  150.  
  151. @4      MacroBegin
  152.         CursorUp
  153.         EndLine
  154.         JoinLine
  155.         DupLine
  156.         DelToEol
  157.         CursorUp
  158.         SplitLine
  159.         DelLine
  160.         CursorDown
  161.         BegLine
  162. *
  163. * 14 bytes Tue  08-13-1991  12:15:23 (TH @4)
  164.  
  165. * 
  166. * ---------------------------------------------------
  167. * @(5) Swap Word at Cursor with Word Right of Cursor
  168. * ---------------------------------------------------
  169. * This macro swaps the cursor word with the first word right of cursor.
  170. * After execution, the cursor is positioned on the first word right of
  171. * the swapped words.  The last word in a line cannot be swapped with
  172. * the first word of the next line.  The same swapping could be
  173. * accomplished using markword/moveblock, but this macro is written to
  174. * maintain any marked block during execution irrespective of all Toggle
  175. * states.  Juxtaposition of text surrounding the swapping words is
  176. * maintained.
  177.  
  178. * With the cursor positioned on word_2:
  179. *                           v
  180. *                   word_1 word_2 word_3 word_4
  181. * becomes
  182. *                   word_1 word_3 word_2 word_4
  183. *                                        ^
  184.  
  185. @5      MacroBegin
  186.         AltWordSet
  187.         DupLine
  188.         WordRight
  189.         DelRtWord
  190.         WordLeft
  191.         SplitLine
  192.         DelLine
  193.         CursorUp
  194.         DelRtWord
  195.         WordRight
  196.         DelToEol
  197.         EndLine
  198.         CursorRight
  199.         JoinLine
  200.         WordRight
  201.         DefaultWordSet
  202. *
  203. * 20 bytes Tue  08-13-1991  15:13:08 (TH @5)
  204.  
  205. * 
  206. * --------------------------------------------------
  207. * @(6) Swap Word at Cursor with Word Left of Cursor
  208. * --------------------------------------------------
  209. * This macro swaps the cursor word with the first word left of cursor.
  210. * After execution, the cursor is positioned on the first word right of
  211. * the swapped words.  The first word in a line cannot be swapped with
  212. * the last word of the previous line.  The same swapping could be
  213. * accomplished using markword/moveblock, but this macro is written to
  214. * maintain any marked block during execution irrespective of all Toggle
  215. * states.  Juxtaposition of text surrounding the swapping words is
  216. * maintained.
  217.  
  218. * With the cursor positioned on word_2:
  219. *                           v
  220. *                   word_1 word_2 word_3 word_4
  221. * becomes
  222. *                   word_2 word_1 word_3 word_4
  223. *                                 ^
  224.  
  225. @6      MacroBegin
  226.         AltWordSet
  227.         WordRight
  228.         WordLeft
  229.         DupLine
  230.         DelRtWord
  231.         WordLeft
  232.         SplitLine
  233.         DelLine
  234.         CursorUp
  235.         DelRtWord
  236.         WordRight
  237.         DelToEol
  238.         EndLine
  239.         CursorRight
  240.         JoinLine
  241.         WordRight
  242.         DefaultWordSet
  243. *
  244. * 21 bytes Tue  08-13-1991  14:09:50 (TH @6)
  245.  
  246. * 
  247. * ---------------------------------------------------------------------
  248. * @(7) Swap Character at Cursor Position with Next Character
  249. *      Written by George de Bruin with Modifications by Tom Hogshead
  250. * ---------------------------------------------------------------------
  251. * This macro will swap the character at the current cursor position
  252. * with the character to the right of the current character.  The cursor
  253. * will be placed to the right of the two swapped characters at the end
  254. * of the macro.  This macro is useful for correcting transposition
  255. * errors in existing text.  This macro clears any marked blocks and is
  256. * an alternate version of @1 in Semware Macros Conference, message #544
  257. * and above.  Timing results comparing @1, @7 and @b are shown below in
  258. * Timing.
  259.  
  260. @7      MacroBegin
  261.         UnmarkBlock                     * Clear any marked block        |
  262.         MarkColumn MarkColumn           * Mark char at cursor pos
  263.         CursorRight CursorRight         * Move two spaces right
  264.         MoveBlock                       * Move marked char here
  265.         CursorRight                     * Move one more space right     |
  266.         UnmarkBlock                     * Clear marked char
  267. *
  268. * 12 bytes Mon  08-12-1991  20:24:58 (TH @7, mod to GdB @1 |)
  269.  
  270. * 
  271. * ------------------------------------------
  272. * @(8) Duplicate Remainder of Previous Line
  273. *      John Goodman, Author
  274. * ------------------------------------------
  275. * This macro will copy the contents of the line above the current
  276. * line from the cursor position forward.  The macro works much like
  277. * entering the GetPrev command repeatedly, except that any
  278. * characters on the current line from the cursor position to the
  279. * end are deleted before the previous line is copied.
  280. *
  281. @8  MacroBegin
  282.     DelToEOL       * Delete remainder of current line
  283.     CursorUp       * Move to line above
  284.     DupLine        * Duplicate the line
  285.     SplitLine      * Split the line at the current cursor pos
  286.     DelLine        * Delete the beginning portion of the line
  287.     DelLine        * Delete the ending portion of the line
  288.     CursorDown     * Move below original line
  289.     UnKill         * Undelete the ending portion of the line
  290.     CursorUp       * Move back to original line
  291.     JoinLine       * Join the ending portion of previous line
  292. *
  293. * 14 bytes Tue  08-20-1991  17:15:58 (JG @8, changed from @3 by JG)
  294.  
  295. * 
  296. * ----------------------------------------------
  297. * @(9) Swap Current Cursor Line with Line Below
  298. *      Alternate version of @3
  299. * ----------------------------------------------
  300.  
  301. * This macro swaps the current cursor line with the line below.  The
  302. * technique below using delline unkill is the simplest and best way to
  303. * do this.  This macro is written to maintain any marked block
  304. * (excluding any marked swapping lines) during execution and is
  305. * irrespective of all Toggle states.  The cursor is positioned at the
  306. * beginning of the swapped line after macro execution.
  307.  
  308. * With the cursor on line_1:
  309. *            >  line_1
  310. *                       line_2
  311. * becomes
  312. * >                     line_2
  313. *               line_1
  314.  
  315. @9      MacroBegin
  316.         CursorDown
  317.         DelLine
  318.         CursorUp
  319.         UnKill
  320. *
  321. * 8 bytes Thu  08-15-1991  16:23:00 (TH @9)
  322.  
  323. * 
  324. * ----------------------------------------------
  325. * @(0) Swap Current Cursor Line with Line Above
  326. *      Alternate version of @4
  327. * ----------------------------------------------
  328.  
  329. * This macro swaps the current cursor line with the line above.  The
  330. * technique below using delline unkill is the simplest and best way to
  331. * do this.  This macro is written to maintain any marked block
  332. * (excluding any marked swapping lines) during execution and is
  333. * irrespective of all Toggle states.  The cursor is positioned at the
  334. * beginning of the swapped line after macro execution.
  335.  
  336. * With the cursor on line_1:
  337. *               line_0
  338. *            >          line_1
  339. * becomes
  340. *                       line_1
  341. * >             line_0
  342.  
  343. @0      MacroBegin
  344.         CursorUp
  345.         DelLine
  346.         CursorDown
  347.         UnKill
  348. *
  349. * 8 bytes Thu  08-15-1991  16:23:00 (TH @0)
  350.  
  351.  
  352.  ab21cd
  353.  
  354. @f1 macrobegin
  355.     dupline
  356.     delch
  357.     shiftright
  358.     getprev
  359.     shiftleft
  360.     cursorup
  361.     delline
  362.     cursorleft
  363. *
  364. * 12 bytes Wed  06-03-1992  16:11:44 (TH @f1)
  365.  
  366. * 
  367. * ----------------------------------------------------------------------
  368. * @(f1) Swap Character at Cursor Position with Previous Character
  369. * ----------------------------------------------------------------------
  370. @f1 macrobegin
  371.     dupline
  372.     delch
  373.     shiftright
  374.     getprev
  375.     shiftleft
  376.     cursorup
  377.     delline
  378.     cursorleft
  379. *
  380. * 12 bytes Wed  06-03-1992  16:11:44 (TH @f1)
  381.  
  382.  
  383.  
  384. * 
  385. * -----------------------------------------------------------
  386. * @(f2) Swap Character at Cursor Position with Next Character
  387. *      Alternate version of @1 by John Goodman, one byte smaller
  388. * -----------------------------------------------------------
  389. * This macro will swap the character at the current cursor position
  390. * with the character to the right of the current character.  The
  391. * cursor will be placed to the right of the two swapped characters
  392. * at the end of the macro.  This macro is useful for correcting
  393. * transposition errors in existing text.  The macro will not work
  394. * correctly if used at or after the end of a line or on a line with
  395. * only one character.
  396.  
  397.  
  398. @f2 MacroBegin
  399.     DupLine        * Duplicate the current line
  400.     SplitLine      * Split the dup-ed line
  401.     DelLine        * Delete the beginning of the line
  402.     CursorUp       * Move up to original line
  403.     DelCh          * Delete 1st char in pair
  404.     CursorRight    * Move over 2nd char in pair
  405.     DelToEOL       * Delete remainder of line
  406.     JoinLine       * Re-join the line
  407.     CursorRight    * Move over the char
  408.     DelCh          * Delete unneeded char
  409. *
  410. * 14 bytes Fri  08-09-1991  17:44:24 (JG @x, changed from @1 by JG)
  411. * 14 bytes Wed  06-03-1992  13:43:44 (TH @f2, changed key)
  412.  
  413. * 
  414. * -----------------------------------------------------------------
  415. * @(f3) Swap Character at Cursor Position with Next Character
  416. *      Written by Mike Konieczny with Modification by Tom Hogshead
  417. * -----------------------------------------------------------------
  418. * This macro will swap the character at the current cursor position
  419. * with the character to the right of the current character.  It is an
  420. * alternate version of @1, and written by Mike Konieczny in SemWare
  421. * RelayNet Conf, message #3410, 8/11/91.  I added  2 unmarkblocks and
  422. * one cursorright in order to compare timing results of @1 and @7.
  423. * Timing results comparing @1, @7 and @b are shown below in Timing.
  424. * This macro clears any marked block and is irrespective of all Toggle
  425. * states.
  426.  
  427. @f3     macrobegin
  428.         unmarkblock             *| added TH
  429.         markcharacter
  430.         cursorright
  431.         cut
  432.         cursorright
  433.         paste
  434.         cursorright             *|
  435.         unmarkblock             *|
  436. *                                           
  437. *  9 bytes Tue  08-13-1991  19:45:29 (MK)
  438. * 12 bytes Tue  08-13-1991  19:47:32 (TH @b, mod to MK, added unmarkblock |)
  439. * 12 bytes Wed  06-03-1992  13:44:29 (TH @f3, changed key)
  440.  
  441. * Check cursor position...
  442. *   v
  443. * 2134 @1
  444. *   v
  445. * 2134 @7
  446. *   v
  447. * 2134 @b
  448.  
  449.  
  450. * 
  451. * -------------------------------------------------------
  452. * @(f4) Swap the Two Characters to the Left of the Cursor
  453. *      Alternate version of @2 by John Goodman
  454. * -------------------------------------------------------
  455.  
  456. * This macro will swap the two characters to the left of the cursor.
  457. * This macro is useful for correcting a transposition error that has
  458. * just been typed.  The macro will not work correctly when used more
  459. * than one character beyond the end of a line or on a line with only
  460. * zero or one characters in it.
  461.  
  462. * This macro is an alternate version of @2 and is the same size, but it
  463. * behaves better when invoked in column 1 or 2 of an *existing* line
  464. * (not a zero or 1 character line).
  465.  
  466. @f4 MacroBegin
  467.     CursorLeft     * Move to beginning of pair
  468.     CursorLeft
  469.     DupLine        * Duplicate the current line
  470.     SplitLine      * Split the dup-ed line
  471.     DelLine        * Delete the beginning of the line
  472.     CursorUp       * Move up to original line
  473.     DelCh          * Delete 1st char in pair
  474.     CursorRight    * Move over 2nd char in pair
  475.     DelToEOL       * Delete remainder of line
  476.     JoinLine       * Re-join the line
  477.     CursorRight    * Move over the char
  478.     DelCh          * Delete unneeded char
  479. *
  480. * 16 bytes Fri  08-09-1991  18:39:28 (JG @y, changed from @2 by JG)
  481. * 16 bytes Wed  06-03-1992  13:45:07 (TH @f4, changed key)
  482.  
  483. * 
  484. * ---------------------------------------------------
  485. * @(f5) Swap Word at Cursor with Word Right of Cursor
  486. *      Alternate version of @5
  487. * ---------------------------------------------------
  488. * This macro swaps the cursor word with the first word right of cursor.
  489. * After execution, the cursor is positioned on the first word right of
  490. * the swapped words.  Juxtaposition of text surrounding the swapping
  491. * words is maintained.  It is an alternate version of @5 included only
  492. * to show a different technique using unkill.
  493.  
  494. * With the cursor positioned on word_2:
  495. *                           v
  496. *                   word_1 word_2 word_3 word_4
  497. * becomes
  498. *                   word_1 word_3 word_2 word_4
  499. *                                        ^
  500.  
  501. @f5     MacroBegin
  502.         AltWordSet
  503.         MarkWord
  504.         DeleteBlock
  505.         DelCh
  506.         WordRight
  507.         SplitLine
  508.         CursorDown
  509.         UnKill
  510.         CursorUp
  511.         JoinLine
  512.         EndLine
  513.         CursorRight
  514.         JoinLine
  515.         DefaultWordSet
  516. * 20 bytes Tue 08-13-1991 15:13:08 (TH @5)
  517. * 18 bytes Tue  08-20-1991  16:22:56 (TH @e)
  518. * 18 bytes Wed  06-03-1992  13:46:00 (TH @f5, changed key)
  519.  
  520.  
  521. * 
  522. * ----------------------------------------------------------------------
  523. * @(f6) Swap First Character on Line With Last, Requires QEdit v2.15,
  524. *       Does NOT Maintain Blocks
  525. * ----------------------------------------------------------------------
  526. @f6 macrobegin
  527.     firstnonwhite
  528.     unmarkblock markcolumn copy
  529.     endline paste
  530.     cursorleft markcolumn markcolumn cut
  531.     firstnonwhite pasteover unmarkblock
  532. *
  533. * 17 bytes Wed  06-03-1992  18:08:29 (TH @f6)
  534.  
  535. * 
  536. * ----------------------------------------------------------------------
  537. * @(f7) Swap First Character on Line With Last, Requires QEdit v2.15,
  538. *       Maintains Blocks
  539. * ----------------------------------------------------------------------
  540. @f7 macrobegin
  541.     setinsmode
  542.     " "
  543.     dupline
  544.     firstnonwhite cursorright splitline delline
  545.     cursordown unkill
  546.     cursorup endline backspace joinline delrtword
  547.     cursorup firstnonwhite cursorright splitline
  548.     cursordown endline cursorleft splitline delline
  549.     cursorup endline backspace
  550.     joinline joinline
  551.     begline
  552.     delch
  553.     firstnonwhite
  554. *
  555. * 36 bytes Wed  06-03-1992  18:13:49 (TH @f7)
  556.  
  557. * 
  558. * ----------------------------------------------------------------------
  559. * @(f8) Swap Character at Cursor with Character Beneath, Maintains Blocks
  560. * ----------------------------------------------------------------------
  561. * This macro may be modified to sway the character at the cursor with
  562. * the character above by removing the first cursordown.  Insert must
  563. * be on.
  564.  
  565. @f8 macrobegin
  566.         cursordown
  567.         getprev
  568.         dupline delline
  569.         cursorup delch
  570.         cursorup unkill
  571.         backspace
  572.         cursordown
  573.         getprev delch
  574.         cursorup delline
  575. *
  576. * 18 bytes Fri  06-12-1992  14:50:50 (TH @f8)
  577.  
  578. * 
  579. * (Timing) Macros @1, @7 and @b
  580. * ------------------------------
  581. * Timing of these three macros was measured using the @1 timing macro
  582. * in TIMERxx.QM  tim001.qm by inserting each macro's commands in the @1
  583. * timing macro followed by 'begline delch' in order to have each macro
  584. * run consistently.  The macros were timed for 5,000 repeats and
  585. * results divided by 5 to give time for 1,000 repeats.  Results are
  586. * believed to be accurate and repeatable to +/- 1.0 second.
  587.  
  588. *                                      Seconds per
  589. *     Macro    Author       Bytes     1,000 Repeats
  590. *    =======  =======      =======   ===============
  591. *       @7       GdB         12            18     (fastest)
  592. *       @1       TH/JG       15            22     (maintain blocks)
  593. *       @b       MK          12            24     (slowest)
  594.  
  595. * The command sequence inserted in @1 timing macro, as an example, is:
  596.  
  597. *         DupLine
  598. *         CursorUp
  599. *         DelCh
  600. *         CursorDown
  601. *         SplitLine
  602. *         GetPrev
  603. *         CursorUp
  604. *         DelLine
  605. *         JoinLine
  606. *         CursorRight
  607. *         DelCh
  608. *         BEGLINE
  609. *         DELCH
  610.  
  611. * Additional tests were run on @7 and @b by selectively removing
  612. * commands to obtain that particular command's portion of the running
  613. * time.  Commands removed were 'moveblock' in @7 and 'paste', then
  614. * 'cut' in @b.  The other commands portion of running time were
  615. * estimated from the Relative Speed estimates in TIMER.SUM, along with
  616. * selected macro variations to get the best estimate possible.  These
  617. * results are as follows:
  618.  
  619. *                           -- Seconds per 1,000 Repeats --
  620. *                             @7          @1          @b
  621. *                            GdB        TH/JG         MK
  622. *                           -----       ------      ------
  623. *     paste                                           13 (54%)
  624. *     moveblock               9 (50%)
  625. *     delch         x 2                   4 (18%)
  626. *     delline                             3
  627. *     markcolumn    x 2       2
  628. *     cut                                             2  (17%)
  629. *     markcharacter                                   2
  630. *     unmarkblock   x 2       2                       2
  631. *     cursorright   x 3       2                       2
  632. *     dupline                             2
  633. *     splitline                           2
  634. *     getprev                             2
  635. *     cursorup      x 2                   2
  636. *     joinline                            2
  637. *     cursordown                          1
  638. *     cursorright                         1
  639. *     timing macro overhead   3           3           3
  640. *                           ----        ----        ----
  641. *     Total                  18          22          24
  642.  
  643. * @1 is slower than @7 because of the additional size and the extra
  644. * steps using the splitline/joinline technique.  If speed and size are
  645. * more important than maintaining marked blocks, @7 is the macro to
  646. * use.  If maintaining block marking is more important, @1 is the macro
  647. * to use.  I generally prefer, however, to write macros that maintain
  648. * marked blocks whenever possible as you can see from the effort John
  649. * Goodman and I put into optimizing @1 above and many other of our AMAC
  650. * macros.
  651.  
  652. * It is interesting to note that the moveblock's time is about 2/3 as
  653. * fast as cut/paste (9 vs 15 secs).  This must be in part do to the two
  654. * screen writes required for cut/paste vs one for moveblock.  It is
  655. * also interesting to note that paste is about 50% slower than
  656. * moveblock (13 vs 9 secs).  The reason for this with the inserted
  657. * commands necessary to test these swap macros is that in timing macro
  658. * @1, paste inserts the swapped character in the timing counter line,
  659. * thereby moving those characters to the right of the inserted
  660. * character that are not yet deleted one space right, and moveblock
  661. * does not.  These results suggest moveblock be used whenever possible,
  662. * rather than cut/paste.
  663.  
  664.  
  665.  
  666.